import * as actionTypes from './actionTypes';

let todoId = 0;

export const addTodo = (text) => ({
    type: actionTypes.ADD_TODO,
    competed: false,
    id: todoId++,
    text: text
})

export const del = (id) => ({
    type: actionTypes.DEL_TODO,
    id: id
})

export const complete = (id) => ({
    type: actionTypes.COMPLETE_TODO,
    id: id
})